import VueRouter from  'vue-router'
import Vue from "vue";
import Login from "../components/Login";
import postHome from "../views/poster/postHome";
import receHome from "../views/receiever/receHome";
import sendHome from "../views/sender/sendHome";
import quoList from "../components/quoList";
import postQuoList from "../views/poster/postQuoList";
import selectContain from "../components/selectContain";
import quoInfoTop from "../components/quoInfoTop";
import quoInfCon from "../components/quoInfCon";
import postQuoInf from "../views/poster/postQuoInf";
import smallWindowDel from "../components/smallWindowDel";
import relativePerson from "../components/relativePerson";
import Quotationari from "../components/Quotationari";
import Stars from "../components/Stars";
import reviewCon from "../components/reviewCon";
import postTaskForm from "../views/poster/postTaskForm";
import checkReviewCon from "../components/checkReviewCon";


Vue.use(VueRouter)
const routes = [
  {
    path: '',
    redirect:'/login'
  },
  {
    path: '/login',
    component: Login,
    meta: {
      title: '登录'
    }
  },
  {
    path: '/posthome',
    component: postHome,
    meta: {
      title: '首页'
    }
  },
  {
    path: '/recehome',
    component: receHome,
    meta: {
      title: '首页'
    }
  },
  {
    path: '/sendhome',
    component: sendHome,
    meta: {
      title: '首页'
    }
  },
  {
    path: '/postquolist',
    component:postQuoList,
    meta: {
      title: '工单列表'
    }
  },
  {
    path: '/postquoinf',
    component: postQuoInf,
    meta: {
      title: '工单详情'
    }
  },
  {
    path: '/posttaskform',
    component: postTaskForm,
    meta: {
      title: '发起工单'
    }
  },
  {
    path: '/tt',
    component:checkReviewCon ,
    meta: {
      title: '测试'
    }
  }
]
const router = new VueRouter({
  routes,
  mode:'history'
})
router.beforeEach(((to, from, next) => {
  document.title=to.meta.title;
  next()

}))
export default router
